<template>
    <div class="user-box">
        <div class="header"></div>
        <div class="body">
            <router-view/>
        </div>
        <div class="footer"></div>
    </div>
</template>

<script>
    export default {
        name: "index",
        beforeRouteEnter(to,from,next) {
            if (sessionStorage.getItem('user_type') === 'user') {
                next()
            } else {
                next({name: 'login'})
            }
        }
    }
</script>

<style scoped>

</style>